package org.esti.service.impl;

import org.esti.model.Interview;
import org.esti.model.InterviewResult;
import org.esti.model.dao.InterviewDAO;
import org.esti.service.InterviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Artem Loginov (logart)
 */

/**
 * {@inheritDoc}
 */
@Service
public class InterviewServiceImpl implements InterviewService {

    @Autowired
    private InterviewDAO interviewDAO;

    /**
     * {@inheritDoc}
     */
    @Override
    public List<Interview> getUserInterviews(long userId) {
        return interviewDAO.getUserInterviews(userId);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Interview getInterview(long interviewId) {
        return interviewDAO.get(interviewId);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<InterviewResult> getInterviewResults(long interviewId) {
        return interviewDAO.getInterviewResult(interviewId);
    }
}
